package com.js.basic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.js.basic.mapper.BsExpertFilesMapper;
import com.js.basic.domain.BsExpertFiles;
import com.js.basic.service.IBsExpertFilesService;

/**
 * 专家附件Service业务层处理
 * 
 * @author lzq
 * @date 20240703
 */
@Service
public class BsExpertFilesServiceImpl implements IBsExpertFilesService 
{
    @Autowired
    private BsExpertFilesMapper bsExpertFilesMapper;

    /**
     * 查询专家附件
     * 
     * @param fileId 专家附件主键
     * @return 专家附件
     */
    @Override
    public BsExpertFiles selectBsExpertFilesByFileId(Long fileId)
    {
        return bsExpertFilesMapper.selectBsExpertFilesByFileId(fileId);
    }

    /**
     * 查询专家附件列表
     * 
     * @param bsExpertFiles 专家附件
     * @return 专家附件
     */
    @Override
    public List<BsExpertFiles> selectBsExpertFilesList(BsExpertFiles bsExpertFiles)
    {
        return bsExpertFilesMapper.selectBsExpertFilesList(bsExpertFiles);
    }

    /**
     * 新增专家附件
     * 
     * @param bsExpertFiles 专家附件
     * @return 结果
     */
    @Override
    public int insertBsExpertFiles(BsExpertFiles bsExpertFiles)
    {
        bsExpertFiles.setCreateTime(DateUtils.getNowDate());
        return bsExpertFilesMapper.insertBsExpertFiles(bsExpertFiles);
    }

    /**
     * 修改专家附件
     * 
     * @param bsExpertFiles 专家附件
     * @return 结果
     */
    @Override
    public int updateBsExpertFiles(BsExpertFiles bsExpertFiles)
    {
        return bsExpertFilesMapper.updateBsExpertFiles(bsExpertFiles);
    }

    /**
     * 批量删除专家附件
     * 
     * @param fileIds 需要删除的专家附件主键
     * @return 结果
     */
    @Override
    public int deleteBsExpertFilesByFileIds(Long[] fileIds)
    {
        return bsExpertFilesMapper.deleteBsExpertFilesByFileIds(fileIds);
    }

    /**
     * 删除专家附件信息
     *
     * @param name 专家附件主键
     * @return 结果
     */

    @Override
    public int deleteBsExpertFilesByFileName(String name) {
        return bsExpertFilesMapper.deleteBsExpertFilesByFileName(name);
    }

    @Override
    public int deleteBsExpertFiles(String name) {
        return bsExpertFilesMapper.deleteBsExpertFiles(name);
    }


}
